package com.zhou.piledriver.controller;

import com.zhou.piledriver.common.R;
import com.zhou.piledriver.common.ResponseResult;
import com.zhou.piledriver.model.vo.AuthVo;
import com.zhou.piledriver.model.dto.LoginDto;
import com.zhou.piledriver.service.LoginService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/auth")
public class AuthController {

    @Resource
    LoginService loginService;

    @PostMapping("/login1")
    public ResponseResult<AuthVo> login(@RequestBody LoginDto dto) {
        return R.success(loginService.login(dto));
    }

    @GetMapping("/test")
    public ResponseResult test(){
        return R.success();
    }
}
